/**
 * 
 */
package webreg.model.exceptions;

/** Exception that is thrown when the competition name is empty
 * 
 * @author STKNOLL
 */
public class NegativNumberException extends WebRegModelException {

	/**
	 * Default serial id
	 */
	private static final long serialVersionUID = 1L;
	private int mWrongNumber = 0;
	private String mWhere = "";

	/**
	 * 
	 */
	public NegativNumberException() {
		mWrongNumber = 0;
		mWhere = "";
	}

	/**
	 * @param arg0
	 */
	public NegativNumberException(int arg0) {
		mWrongNumber = arg0;
	}

	/**
	 * @param arg0
	 */
	public NegativNumberException(int arg0, String inWhere) {
		mWrongNumber = arg0;
		mWhere = inWhere;
	}

	/**
	 * 
	 * @return The wrong number
	 */
	public int getWrongNumber() {
		return mWrongNumber;
	}

	@Override
	public String getMessage() {
		return "The given number: " + getWrongNumber() + " in " + mWhere + " may not be negativ.";
	}
}
